package com.hbnu.collections;

/**
 * 需求：实现一个可以存放任意类型数据的数组
 *
 * @author kittychen
 * @since 2025-10-11 10:09
 */
public class ObjectArray {

    private Object[] data;

    public ObjectArray(int capacity) {
        this.data = new Object[capacity];
    }

    public void addData(int index, Object data) {
        this.data[index] = data;
    }

    public Object getData(int index) {
        return this.data[index];
    }
}
